package com.jivesoftware.forum.model;

public class ForumThreadBean {

	private long iD;
	private long creationDate;
	private long modifiedDate;
	private long forum;
	private long rootMessage;
	private String name;

    /**
     * Returns the unique id of the thread.
     */
    public long getID()
    {
    	return iD;
    }

    public void setID(long iD)
    {
    	this.iD = iD;
    }
    
    /**
     * Returns the subject of the root message of the thread. This is a
     * convenience method equivalent to <code>getRootMessage().getSubject()</code>.
     *
     * @return the name of the thread, which is the subject of the root message.
     */
    public String getName()
    {
    	return name;
    }
    
    public void setName(String name)
    {
    	this.name = name;
    }

    /**
     * Returns the Date that the thread was created.
     *
     * @return the Date the thread was created.
     */
    public long getCreationDate()
    {
    	return creationDate;
    }

    /**
     * Sets the creation date of the thread. In most cases, the creation date
     * will default to when the thread was entered into the system. However,
     * the creation date needs to be set manually when importing data.
     * In other words, skin authors should ignore this method since it only
     * intended for system maintenance.
     *
     * @param creationDate the date the thread was created.
     */
    public void setCreationDate(long creationDate)
    {
    	this.creationDate = creationDate;;
    }

    /**
     * Returns the Date that the thread was last modified. In other words, the
     * date of the most recent message in the thread.
     */
    public long getModifiedDate()
    {
    	return modifiedDate;
    }

    /**
     * Sets the date the thread was last modified. In most cases, last modifed
     * will default to when the thread data was last changed. However,
     * the last modified date needs to be set manually when importing data.
     * In other words, skin authors should ignore this method since it only
     * intended for system maintenance.
     *
     * @param modifiedDate the date the thread was modified.
     */
    public void setModifiedDate(long modifiedDate)
    {
    	this.modifiedDate = modifiedDate;
    }

    /**
     * Returns the parent Forum of the thread.
     */
    public long getForum()
    {
    	return forum;
    }

    public void setForum(long forum)
    {
    	this.forum = forum;
    }
    /**
     * Returns the root message of a thread. The root message is a special
     * first message that is intimately tied to the thread for most forumViews.
     * All other messages in the thread are children of the root message.
     */
    public long getRootMessage()
    {
    	return rootMessage;
    }

    public void setRootMessage(long rootMessage)
    {
    	this.rootMessage = rootMessage;
    }
}
